<%@ include file="/common/include.jsp"%>
<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<jsp:include page="../../../common/head.jsp">
			<jsp:param name="_useCalendar" value="true"/>
			<jsp:param name="_useUpload" value="true"/>
		</jsp:include>
		<script language="javascript">
	function saveinfofs()
	{   
		document.form1.state.value="已发送";
		var objarr = new Array(
			["sysMessage.messageTitle","系统标题","notEmpty",""],
			["sysMessage.messageTitle","系统标题","max","String:100"],
			["sysMessage.messageContent","消息内容","notEmpty",""]
		);	
		if(xj.CheckAll(objarr))
		{
			if(confirm("确认发送？"))
			{
				return true;
			}
		}
		return false;
	}
	function saveinfobc()
	{   
		document.form1.state.value="未发送";
		var objarr = new Array(
			["sysMessage.messageTitle","系统标题","notEmpty",""],
			["sysMessage.messageTitle","系统标题","max","String:100"],
			["sysMessage.messageContent","消息内容","notEmpty",""]
		);	
		if(xj.CheckAll(objarr))
		{
			if(confirm("确认存入草稿箱？"))
			{
				return true;
			}
		}
		return false;
	}
	function addUser(that)
	{
		var userIds = '${userIds}';
		var users=ModalWindow("jump.do?path=${ctx}/jsp/common/user/index.jsp&userIds="+userIds,1000,600);
		if(users!=null)
		{
			$("#receiver").show();
			var arr = new Array();
			arr =  users.split(";");
			for(var i=0;i<arr.length;i++)
			{
				var ar = arr[i].split(",");
		   		$("#receiver").append("<tr><td>"+ar[0]+"<input type='hidden' name='userId' value='"+ar[0]+"'></td><td>"+ar[1]+"<input type='hidden' name='userName' value='"+ar[1]+"'></td><td><a href='#' onclick='delRow(this)'>删除</a></td></tr>");
		   }
		}
	}
	function delRow(that)
	{
		$(that).parent().parent().remove();
	}
</script>

		<title>回复消息信息</title>
	</head>
	<body>
		<form action="addReplyMessage.do" name="form1" method="post" enctype="multipart/form-data">
			<div id="body_div">
				<w:ShowTitle name="添加消息信息">
					<w:TitleButton funcName="发送" onClickFunction="return saveinfofs()" urlImg="${ctx}/images/main/save1.png" funcType="submit" />
				    <w:TitleButton funcName="保存草稿" onClickFunction="return saveinfobc()" urlImg="${ctx}/images/main/save.png" funcType="submit" />
				</w:ShowTitle>
				<div id="body_content">
					<table width="100%">
						<tr>
							<td class="right_align">
								接收人id
							</td>
							<td class="left_align">
							<input type="text" name="userId" value="${userId}" readonly/>
							<input type="hidden" name="state"/>
							</td>
						</tr>
						<tr>
							<td class="right_align">
								接收人姓名
							</td>
							<td class="left_align">
							<input type="text" name="userName" value="${userName}" readonly/>
							</td>
						</tr>
						<tr>
							<td class="right_align">
								消息标题
							</td>
							<td class="left_align">
								<input type="text" name="sysMessage.messageTitle" value="${messageTitle}"/>
							</td>
						</tr>
						<tr>
							<td class="right_align">
								消息内容
							</td>
							<td colspan="3" class="left_align">
								<textarea cols="80" rows="5" name="sysMessage.messageContent"></textarea>
							</td>
						</tr>
						<tr>
							<td class="right_align">
								备注
							</td>
							<td colspan="3" class="left_align">
								<textarea cols="80" rows="3" name="sysMessage.remark"></textarea>
							</td>
						</tr>
						<tr>
							<td class="right_align">
								附件
							</td>
							<td colspan="3" class="left_align">
								<w:uploadFile isList="false" isAdd="true" folder="sysMessage"></w:uploadFile>
							</td>
						</tr>
					</table>
					
				</div>
			</div>
		</form>
	</body>
</html>
